package com.example.homework.repositories

import com.example.homework.db.daos.PhotoDao
import com.example.homework.db.tables.Photos
import kotlinx.coroutines.flow.Flow

class PhotoRepository(val photoDao: PhotoDao) {
    val photos: Flow<List<Photos>> = photoDao.getAll()

    suspend fun addPhoto(photo: Photos){
        photoDao.add(photo)
    }
}